﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sunimage.Spjg.BLL;
using Sunimage.Spjg.BLL.SysMgr;
using Sunimage.Spjg.Common;
using Sunimage.Spjg.Web.Helper;

namespace Sunimage.Spjg.Web.Admin
{
    public partial class NoteDetail : System.Web.UI.Page
    {
        private NoteBl noteBl = new NoteBl();
        UserBl userBl = new UserBl();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = Convert.ToInt32(Request["id"]);
                Common.Note note = noteBl.GetById(id);
                Common.User user = userBl.GetById(note.CreatorId);
                if (user != null)
                    lblCreator.Text = user.NickName;
                else
                    lblCreator.Text = AppConstant.DeleteUserNickname;
                lblTime.Text = note.CreateTime.ToShortDateString();
                lblTitle.Text = note.Title;
                lblContent.Text = note.Content;
            }
        }


        protected void btnCancelNewCommercer_Click(object sender, EventArgs e)
        {
            Response.Redirect("Note.aspx");
        }

        protected void btnReply_Click(object sender, EventArgs e)
        {

        }
    }
}